//
//  HEAISubItemModel.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/11/22.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEAISubItemModel.h"

@implementation HEAISubItemModel

- (CGFloat)contentWidth {
    if (!_contentWidth) {
        
        CGFloat warp = KScreenWidth - (15 + 50 + 15 + 15 + 50 + 5) - 15 * 2;
        _contentWidth = ceilf([_content widthForFont:DYFont(16)]) + 30;
        if (_contentWidth > warp) {
            _contentWidth = warp;
        }
    }
    return _contentWidth;
}

- (CGFloat)contentHeight {
    if (!_contentHeight) {
        _contentHeight = [_content heightForFont:DYFont(16) width:self.contentWidth - 30] + 10;
    }
    return _contentHeight;
}

//- (id)getAttachModel:(Class)clasz {
//    if ([[_attachModel class] isKindOfClass:clasz]) {
//        return _attachModel;
//    }else {
//        return [];
//    }
//}

@end
